Fix save/restore of guest PAT table in HAP paging mode.
authorGianluca Guida <gianluca.guida@citrix.com>
Tue, 17 Apr 2012 07:29:26 +0000 (08:29 +0100)
committerGianluca Guida <gianluca.guida@citrix.com>
Tue, 17 Apr 2012 07:29:26 +0000 (08:29 +0100)
commit9cfc1be3b96e547b21fd3a53639ff51a08b05b5a
tree1da4dab23c0a2f6d3a80c74d04fb8764c18ab9e3
parent625550282c299d6607eb4bdb35b3ebadb5ae77b3
Fix save/restore of guest PAT table in HAP paging mode.

HAP paging mode guests use direct MSR read/write into the VMCS/VMCB
for the guest PAT table, while the current save/restore code was
accessing only the pat_cr field in hvm_vcpu, used when intercepting
the MSR mostly in shadow mode (the Intel scenario is a bit more
complicated).  This patch fixes this issue creating a new couple of
hvm_funcs, get/set_guest_pat, that access the right PAT table based on
the paging mode and guest configuration.

Signed-off-by: Gianluca Guida <gianluca.guida@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/mtrr.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c
xen/include/asm-x86/hvm/hvm.h